<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: aifes_express_q7_fnn.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('aifes__express__q7__fnn_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">aifes_express_q7_fnn.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="aifes__express__q7__fnn_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#ifndef EXPRESS_FNN_Q7</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#define EXPRESS_FNN_Q7</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aifes__express__f32__fnn_8h.html">basic/express/aifes_express_f32_fnn.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="aifes__express__q7__fnn_8h.html#ac543551279494c6ce9709e4ee6f59104">   39</a></span>&#160;uint32_t <a class="code" href="aifes__express__q7__fnn_8h.html#ac543551279494c6ce9709e4ee6f59104">AIFES_E_flat_weights_number_fnn_q7</a>(uint32_t *fnn_structure, uint32_t layer_count);</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="aifes__express__q7__fnn_8h.html#a0518e913814f0ab2f04f75f3d47c495e">   91</a></span>&#160;int8_t <a class="code" href="aifes__express__q7__fnn_8h.html#a0518e913814f0ab2f04f75f3d47c495e">AIFES_E_quantisation_fnn_f32_to_q7</a>(<a class="code" href="structaitensor.html">aitensor_t</a> *representative_f32_dataset,</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                                          <a class="code" href="struct_a_i_f_e_s___e__model__parameter__fnn__f32.html">AIFES_E_model_parameter_fnn_f32</a> *AIFES_E_fnn,</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                                          uint8_t *q7_parameter_dataset);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160; </div>
<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="aifes__express__q7__fnn_8h.html#a2bf3d2e767a7a1d9bef8a1a179e7324a">  163</a></span>&#160;int8_t <a class="code" href="aifes__express__q7__fnn_8h.html#a2bf3d2e767a7a1d9bef8a1a179e7324a">AIFES_E_inference_fnn_q7</a>(<a class="code" href="structaitensor.html">aitensor_t</a> *input_tensor,</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;                                <a class="code" href="struct_a_i_f_e_s___e__model__parameter__fnn__f32.html">AIFES_E_model_parameter_fnn_f32</a> *AIFES_E_fnn,</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                                <a class="code" href="structaitensor.html">aitensor_t</a> *output_tensor);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160; </div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// EXPRESS_FNN_Q7</span></div>
<div class="ttc" id="aaifes__express__f32__fnn_8h_html"><div class="ttname"><a href="aifes__express__f32__fnn_8h.html">aifes_express_f32_fnn.h</a></div><div class="ttdoc">AIfES Express functions for weights with F32 (float32) data type.</div></div>
<div class="ttc" id="aaifes__express__q7__fnn_8h_html_a0518e913814f0ab2f04f75f3d47c495e"><div class="ttname"><a href="aifes__express__q7__fnn_8h.html#a0518e913814f0ab2f04f75f3d47c495e">AIFES_E_quantisation_fnn_f32_to_q7</a></div><div class="ttdeci">int8_t AIFES_E_quantisation_fnn_f32_to_q7(aitensor_t *representative_f32_dataset, AIFES_E_model_parameter_fnn_f32 *AIFES_E_fnn, uint8_t *q7_parameter_dataset)</div><div class="ttdoc">Quantizes the weights of an F32 FNN into a Q7 FNN.</div></div>
<div class="ttc" id="aaifes__express__q7__fnn_8h_html_a2bf3d2e767a7a1d9bef8a1a179e7324a"><div class="ttname"><a href="aifes__express__q7__fnn_8h.html#a2bf3d2e767a7a1d9bef8a1a179e7324a">AIFES_E_inference_fnn_q7</a></div><div class="ttdeci">int8_t AIFES_E_inference_fnn_q7(aitensor_t *input_tensor, AIFES_E_model_parameter_fnn_f32 *AIFES_E_fnn, aitensor_t *output_tensor)</div><div class="ttdoc">Executes the inference of a Q7 FNN.</div></div>
<div class="ttc" id="aaifes__express__q7__fnn_8h_html_ac543551279494c6ce9709e4ee6f59104"><div class="ttname"><a href="aifes__express__q7__fnn_8h.html#ac543551279494c6ce9709e4ee6f59104">AIFES_E_flat_weights_number_fnn_q7</a></div><div class="ttdeci">uint32_t AIFES_E_flat_weights_number_fnn_q7(uint32_t *fnn_structure, uint32_t layer_count)</div><div class="ttdoc">Calculates the required length of the uint8_t array for the FNN.</div></div>
<div class="ttc" id="astruct_a_i_f_e_s___e__model__parameter__fnn__f32_html"><div class="ttname"><a href="struct_a_i_f_e_s___e__model__parameter__fnn__f32.html">AIFES_E_model_parameter_fnn_f32</a></div><div class="ttdoc">Parameters for the FNN model.</div><div class="ttdef"><b>Definition:</b> aifes_express_f32_fnn.h:107</div></div>
<div class="ttc" id="astructaitensor_html"><div class="ttname"><a href="structaitensor.html">aitensor</a></div><div class="ttdoc">A tensor in AIfES.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:89</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1e5d3661ed79af157d57e64a38265d09.html">basic</a></li><li class="navelem"><a class="el" href="dir_d248cdab09ece91db2a68dd96cc4ef4f.html">express</a></li><li class="navelem"><a class="el" href="aifes__express__q7__fnn_8h.html">aifes_express_q7_fnn.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
